In Cypress, assertions are how you check that something is true during your test—like checking if a button exists, a value is correct, or a page has loaded properly. Cypress uses Chai, Sinon, and jQuery assertions under the hood, and it integrates them with commands like should() and expect().
Text exists : cy.contains('Login Successful')
Element is visible: cy.get('.alert').should('be.visible')
Class or attribute check: cy.get('button').should('have.class', 'primary')
URL or title check: cy.url().should('include', '/home')
Value in input field: cy.get('#name').should('have.value', 'John')
Checkbox is checked: cy.get('#subscribe').should('be.checked')
Assertions automatically wait for the condition to be true (up to default timeout).
You can chain multiple assertions